package cn.snowheart.iterator.menu;

/**
 * 菜单项
 *
 * @author liuwanxiang
 * @version 2019/07/09
 */
public class MenuItem {

    /**
     * 名称
     */
    private String name;

    /**
     * 描述
     */
    private String description;

    /**
     * 素食标识
     */
    private boolean vegetarian;

    /**
     * 单价
     */
    private double price;

    public MenuItem(String name, String description, boolean vegetarian, double price) {
        this.name = name;
        this.description = description;
        this.vegetarian = vegetarian;
        this.price = price;
    }

    @Override
    public String toString() {
        return String.format("MenuItem{%s\t%s\t%s\t%s}", name, description, vegetarian, price);
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public boolean isVegetarian() {
        return vegetarian;
    }

    public double getPrice() {
        return price;
    }
}
